<?php

class categoryActions extends sfActions
{
public function executeShow(sfWebRequest $request)
{
  $this->category = $this->getRoute()->getObject();
 
  $this->pager = new sfDoctrinePager(
    'HisItem',
    sfConfig::get('app_max_items_on_category')
  );
  $this->pager->setQuery($this->category->getAllItemsQuery());
  $this->pager->setPage($request->getParameter('page', 1));
  $this->pager->init();
}}